<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let arr = ['张学友', '刘德华', '黎明', '郭富城']
      let num = arr.shift()
      let num2 = arr.pop()
      arr.push(num)
      arr.unshift(num2)
      document.write(arr)
    </script>
  </body>
</html>
